<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateFreeCarsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('free_cars', function (Blueprint $table) {
            $table->id()->autoIncrement();
            $table->string('licensePlate')->index()->comment('车牌');
            $table->string('constructionUnit')->index()->comment('');
            $table->string('freeTimeStart')->index()->comment('');
            $table->string('freeTimeEnd')->index()->comment('');
            $table->string('freeSection')->index()->comment('');
            $table->string('vehicleType')->index()->comment('');
            $table->string('theValidityPeriodOfTheAnnualInspectionOfTheVehicle')->nullable()->comment('');
            $table->string('validityPeriodOfVehicleInsurance')->nullable()->comment('');
            $table->string('updatedDate')->comment('');
            $table->string('remark')->nullable()->comment('');
            $table->string('photo')->nullable()->comment('证件照片');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('free_cars');
    }
}
